package com.mzy.basics.reflectionDemo.newReflection;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author mzy
 * @Date 2022/6/14 22:53
 * @Version 1.0
 */
public class GetFieldsNumber {
    /**
     * 反射获取类对象属性的个数
     * @param args
     */
    public static void main(String[] args) {
        Class<Dog> clazz = Dog.class;
        int length = clazz.getDeclaredFields().length;
        System.out.println(length);
    }
}
